Writing An M Function Using Chatgpt